#ifndef __ARRAY_H__
#define __ARRAY_H__

#include <cstddef>
#include <iostream>

class array {
	private:
		int * memory;
		size_t capacity;
		size_t size;

		void increase_size();
	public:
		array(size_t size);
		array(const array& obj);
		~array();

		void swap(array & obj);
		array & operator=(array obj);
		int & operator[](size_t pos);
		const int & operator[](size_t pos) const;

		void push_back(int value);
		void set(size_t pos, int value);
		int get(size_t pos) const;
		size_t get_size() const;

		void print(std::ostream & out) const;
};

std::ostream & operator<<(std::ostream & out, const array & obj);

#endif /*__ARRAY_H__*/
